<template>
	<view class="agreement">
		<view class="txt">{{info.Content}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:null,
				type: 0
			}
		},

		onLoad(options) {
			this.type = options.type || 0;
			if (this.type == 1) {
				uni.setNavigationBarTitle({
					 title:this.$t('mine.agreement_title1')
				 })
			}else{
				uni.setNavigationBarTitle({
					 title:this.$t('mine.agreement_title0')
				 })
			}
		},
		onShow() {
			this.getInfo();
		},
		components: {
		},
		computed: {
		},
		methods: {
			getInfo(){
				var cid = this.type == 0 ? 215 : 218;
				if(uni.getStorageSync('lang')){
					var lang = uni.getStorageSync('lang');
					if(lang == 'English'){
						cid = this.type == 0 ? 216 : 219;
					}else if(lang == 'русский'){
						cid = this.type == 0 ? 217 : 220;
					}
				}
				this.$http.get('/mgr/cms/info/info',{cid:cid}).then(res => {
					this.info = res;
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.agreement {
		padding: 50rpx 35rpx;
		white-space: normal;
		word-break: break-all;
		.title{
			margin-top: 20rpx;
			font-size: 30rpx;
			color: #222222;
			text-align: center;
		}
		.txt{
			color: #666666;
			line-height: 44rpx;
			white-space: pre-line;
		}
	}
</style>
